
<div class="clearfix pb-20" id="resourceListIndex" style="margin:0 24px;">
	<hl-page-header title="配置项目">
			<hl-button type="outline" @on-click="isDisplayDialog" v-if="SINOOCEAN.indexOf('SINOOCEAN') > -1">同步资源</hl-button>
			<hl-button type="outline" @on-click="removeCookie" v-if="quanxian.indexOf('c20') > -1">新建项目</hl-button>
			<!-- <hl-button type="outline" @on-click="openWindows">打开窗口</hl-button> -->
	</hl-page-header>

	<div class="clearfix">
		<div class="res-pro-list text-center" v-for="item in data">
			<div class="res-pic">
				<img :src="item.preview+'?w=226&h=171'" />
				<div class="js-p-n"><p class="name">{{item.projectName}}({{item.buildingCount}})</p></div>
			</div>
			<div class="res-txt">
				<p class="to-config">面积：{{item.acreage | formatNum}}m²</p>
				<p class="to-config">工位／{{item.wpCount}}个</p>
				<p class="to-config">车位／{{item.stCount}}个</p>
				<span class="complete">{{item.config_state == 'FN' ? '运营中' : '筹备中'}}</span>
			</div>
			<div class="res-btn-box clearfix">
				<a  class="res-see rs-edit-fl font-12" v-if="item.configState == 'FN'" data-control="c21" @click="editZh(item.projectId, item.name, item.configPhase)">查看/编辑</a>
				<button class="res-del js-rs-del-pt pull-left font-12" v-if="item.configState != 'FN'" @click="removeDel(item.projectId)" style="color:#fff;">删除</button>
				<a   v-if="item.configState != 'FN'" class="res-edit rs-edit-fl pull-right font-12" data-control="c21" @click="editZh(item.projectId, item.name, item.configPhase)"  style="color:#fff;">编辑</a>
			</div>
		</div>
	</div>

	<hl-dialog title="同步资源" :visible="isShowDialog" @on-close="isDisplayDialog" :width="900" :height="531">
			<div class="clearfix">
				<span>项目：</span>
				<div class="inline">
					<hl-autoComplete :data="projectList"  v-model="selectProData" width="156" @on-change="selectPROJ"></hl-autoComplete>
				</div>
				<span class="pl-12">地块：</span>
				<div class="inline">
					<hl-autoComplete :data="massifList"  v-model="selectmassifData" width="156" @on-change="selectMassif"></hl-autoComplete>
				</div>
				<span class="pl-12">楼栋：</span>
				<div class="inline">
					<hl-autoComplete :data="buildingList"  v-model="selectBuilding" width="156" @on-change="selectBuild"></hl-autoComplete>
				</div>
				<hl-button size="mini" class="ml-10" @on-click="queryhouse">查询</hl-button>
				<hl-button size="mini" @on-click="resethouse">重置</hl-button>
			</div>
			<div class="clearfix">
				<div class="pull-left" style="width: 550px;">
					<h3 class="font-14">可同步房源</h3>
					<div class="bg-fff box-i-shadow br-4 relative">
						<div class="absolute z-50 dy-flex" v-if="loadingGif" style="left: 0; top: 0;height: 100%;width: 100%;justify-content: center;align-items: center;background: rgba(255,255,255,0.5);">
							<img src="assets/images/loading.gif" alt="">
						</div>
						<vue-scroll :ops="ops" style="height: 274px;">
							<div class="dy-flex line-height-40 text-center color-gray border-b">
								<div class="dy-fx-4 text-left cursor" @click="checkallhouse">
									<span class="pl-12"></span>
									<span class="hl-checkbox" :class="{active: checkAllFlag}"></span>
									<span>项目</span>
								</div>
								<div class="dy-fx-2">地块</div>
								<div class="dy-fx-2">楼栋</div>
								<div class="dy-fx-2">单元楼</div>
								<div class="dy-fx-2">楼层</div>
								<div class="dy-fx-2">房间</div>
							</div>
							<div class="dy-flex line-height-40 text-center border-b" v-for="(item, index) in synchroHouseList">
								<div class="dy-fx-4 text-left cursor" @click="checkonehouse(index)">
									<span class="pl-12"></span>
									<span class="hl-checkbox" :class="{active: item.flag}"></span>
									<span>{{ item.projectName }}</span>
								</div>
								<div class="dy-fx-2 ellipsis-1" :title="item.stageAreaName">{{ item.stageAreaName }}</div>
								<div class="dy-fx-2 ellipsis-1" :title="item.logicBuildingName">{{ item.logicBuildingName }}</div>
								<div class="dy-fx-2">{{ item.unitName }}</div>
								<div class="dy-fx-2">{{ item.floorName }}</div>
								<div class="dy-fx-2 ellipsis-1">{{ item.houseName }}</div>
							</div>
						</vue-scroll>
					</div>
					<p class="color-gray">共{{ synchroHouseList.length }}条数据</p>
				</div>
				<div class="pull-right" style="width: 260px;">
					<h3 class="font-14">已选择房源</h3>
					<div class="bg-fff box-i-shadow br-4">
						<vue-scroll :ops="ops" style="height: 274px;">
							<div class="dy-flex line-height-40 text-center color-gray border-b">
								<div class="dy-fx-4 text-left">
									<span class="pl-12">项目</span>
								</div>
								<div class="dy-fx-2">房间</div>
								<div class="dy-fx-2 border-l">操作</div>
							</div>
							<div class="dy-flex line-height-40 text-center border-b" v-for="(item, index) in selectSynchroHouseList">
								<div class="dy-fx-4 text-left">
									<span class="pl-12">{{ item.projectName }}</span>
								</div>
								<div class="dy-fx-2">{{ item.houseName }}</div>
								<div class="dy-fx-2 border-l">
									<span class="icon-Gm-delete cursor" @click="delhouse(index)"></span>
								</div>
							</div>
						</vue-scroll>
					</div>
					<p class="color-gray">共 {{ selectSynchroHouseList.length }} 条数据</p>
				</div>
			</div>
			<div class="dy-flex mt-15 pt-10">
				<div class="dy-fx-1">审批事项：</div>
				<div class="dy-fx-13">
					<textarea rows="4" class="form-control" placeholder="请输入审批事项（必填）" v-model="memo"></textarea>
				</div>
			</div>
			<div slot="footer">
					<hl-button type="primary" @on-click="postZy">提交审批</hl-button>
					<hl-button type="outline" @on-click="isDisplayDialog">取消</hl-button>
			</div>
	</hl-dialog>

</div>

<script src="modules/system_config/scripts/resource_list.js" charset="utf-8"></script>
